package jl.cts.objects;

import jl.cts.util.Sprite;
import android.content.Context;

public class Car extends Sprite {

	public Car(Context context, Integer resourceId, int x, int y) {
		super(context, resourceId, x, y);
	}

	public boolean isOutOfTheRoadRight(int roadX, int roadWidth) {
		if (this.getX() > roadX + roadWidth) {
			return true;
		} else {
			return false;
		}
	}

	public boolean isOutOfTheRoadLeft(int roadX) {
		if (this.getX() + this.getWidth() < roadX) {
			return true;
		} else {
			return false;
		}
	}

}
